import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'

/** 简单图片链接属性 */
export interface SimpleImageLinkProperty {
  // 图片链接
  imageUrl: string
  // 跳转链接
  linkUrl: string
  // 组件样式
  style: ComponentStyle
}

// 定义组件
export const component = {
  id: 'SimpleImageLink',
  name: '简单图片链接',
  icon: 'ep:picture',
  property: {
    imageUrl: 'https://static.iocoder.cn/mall/banner-01.jpg',
    linkUrl: '',
    style: {
      bgType: 'color',
      bgColor: '#fff',
      marginTop: 8,
      marginBottom: 8,
      marginLeft: 8,
      marginRight: 8,
      borderRadius: 8
    } as ComponentStyle
  }
} as DiyComponent<SimpleImageLinkProperty>

